<?php
class Form_Photo extends Zend_Form
{

    public function __construct () {
        $this->setName('form_photo');
        $this->setAttrib('enctype', 'multipart/form-data');
        parent::__construct();
        
        $image = new Zend_Form_Element_File('photo');
        $image->setLabel(
            'Photo type')
            ->addValidator('Size', false, 819200)
            ->addValidator('Extension', false, 'jpg,png,gif')
            ->setRequired(true);
        
        $submit = new Zend_Form_Element_Submit('Upload');
        $submit->setLabel('Submit');
        
        $this->addElements(array($image, $submit));
    }
}
?>
